package com.course.smart_campus.controller;

import com.course.smart_campus.entity.DeliverOrder;
import com.course.smart_campus.entity.Dormitory;
import com.course.smart_campus.entity.Repairs;
import com.course.smart_campus.entity.User;
import com.course.smart_campus.service.DeliverOrderService;
import com.course.smart_campus.service.DormitoryService;
import com.course.smart_campus.service.RepairsService;
import com.course.smart_campus.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class testController {
    @Autowired
    private UserService userService;
    @Autowired
    private DeliverOrderService deliverOrderService;
    @Autowired
    private RepairsService repairsService;

    @RequestMapping
    public String test(){
        User user = userService.getById(1);
        System.out.println(user);
        DeliverOrder deliverOrder = deliverOrderService.getById(1);
        System.out.println(deliverOrder);
        Repairs repairs = repairsService.getById(1);
        System.out.println(repairs);
        return "test";
    }
}
